/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package es.unavarra.iws.routerinstall.gui;

import java.awt.Container;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *
 * @author aqm
 */
public class InstalacionGeneral extends javax.swing.JPanel {

    /**
     * Creates new form Router1Panel2
     */
    String titError;
    String comError;
    
    public InstalacionGeneral(String titulo, String comments, String titError, String comError, Boolean error) {
        initComponents();
        jlTitulo.setText(titulo);
        jtaComments.setText(comments);
        this.titError = titError;
        this.comError = comError;
        if (error == false){
            jButton1.setEnabled(false);
        }
    }
/*
    public boolean isCheckBoxSelected() {
        return jCheckBox1.isSelected();
    }    
    
    public void addCheckBoxActionListener(ActionListener l) {
        jCheckBox1.addActionListener(l);
    }    
     * 
     */
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup2 = new javax.swing.ButtonGroup();
        jpTitulo = new javax.swing.JPanel();
        jlTitulo = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jlIcono = new javax.swing.JLabel();
        jpContenido = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtaComments = new javax.swing.JTextArea();
        jpBotonError = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();

        setLayout(new java.awt.BorderLayout());

        jpTitulo.setForeground(java.awt.Color.gray);
        jpTitulo.setLayout(new java.awt.BorderLayout());

        jlTitulo.setBackground(java.awt.Color.lightGray);
        jlTitulo.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
        jlTitulo.setText("Conectar SIM al Modem");
        jlTitulo.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
        jlTitulo.setOpaque(true);
        jpTitulo.add(jlTitulo, java.awt.BorderLayout.CENTER);

        jSeparator1.setBackground(java.awt.Color.lightGray);
        jSeparator1.setOpaque(true);
        jpTitulo.add(jSeparator1, java.awt.BorderLayout.SOUTH);

        jlIcono.setBackground(java.awt.Color.lightGray);
        jlIcono.setIcon(new javax.swing.ImageIcon(getClass().getResource("/es/unavarra/iws/routerinstall/resources/img/setting32.png"))); // NOI18N
        jlIcono.setOpaque(true);
        jpTitulo.add(jlIcono, java.awt.BorderLayout.LINE_END);

        add(jpTitulo, java.awt.BorderLayout.NORTH);

        jpContenido.setLayout(new java.awt.BorderLayout());

        jPanel1.setPreferredSize(new java.awt.Dimension(480, 192));
        jPanel1.setLayout(new java.awt.GridLayout(0, 1));

        jtaComments.setColumns(20);
        jtaComments.setEditable(false);
        jtaComments.setLineWrap(true);
        jtaComments.setRows(5);
        jScrollPane1.setViewportView(jtaComments);

        jPanel1.add(jScrollPane1);

        jpContenido.add(jPanel1, java.awt.BorderLayout.CENTER);

        add(jpContenido, java.awt.BorderLayout.CENTER);

        jButton1.setText("Posibles errores y soluciones");
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton1MouseClicked(evt);
            }
        });
        jpBotonError.add(jButton1);

        add(jpBotonError, java.awt.BorderLayout.SOUTH);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
        final JComponent[] panelError = new JComponent[] {new PanelError(titError, comError)};
        JOptionPane.showMessageDialog(null, panelError, "Errores", JOptionPane.PLAIN_MESSAGE);
    }//GEN-LAST:event_jButton1MouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JButton jButton1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel jlIcono;
    private javax.swing.JLabel jlTitulo;
    private javax.swing.JPanel jpBotonError;
    private javax.swing.JPanel jpContenido;
    private javax.swing.JPanel jpTitulo;
    private javax.swing.JTextArea jtaComments;
    // End of variables declaration//GEN-END:variables
}
